﻿#ifndef DEVOPT_H
#define DEVOPT_H

#include <QString>

class DevOpt
{
public:
    enum CLOSE_PC_TYPE {
        CLOSE_PC_AT_ONCE = 0,
        CLOSE_PC_BY_TIME,
        RESTART_PC_AT_ONCE,
        RESTART_PC_BY_TIME,
        SLEEP_PC_AT_ONCE,
        LOGOFF_PC_AT_ONCE,
        REMOVE_CLOSE_PC
    };

     DevOpt();

     bool actionCmd(QString cmd, QString& execStr, int msecs = 10000);
     bool chkIsMacAddr(QString mac);
     QString closePc(CLOSE_PC_TYPE type, QString argv = "127.0.0.1");

     bool openPc(QString mac, QString addr = "255.255.255.255");
     bool closePcByWinApi();
     bool closePcByCmd();

     bool openSoft(QString softname);
     bool closeSoft(QString softname);
     bool closeSoftByCmd(QString softname);

};

#endif // DEVOPT_H
